<html>
<head>
  <body>
    <script>
      window.onblur = function() { document.title='blurred' };
      window.onfocus = function() { document.title='focused' };
      document.title = 'initial';
    </script>
  </body>
</html>
